GET Response Play API call working?

Hi,

Looking for some support with an API call.

I’m trying to get details of a response play or list the response plays. I’ve used the Try it function in the API docs and a curl call with valid token from cli.

All the examples on the pages listed below return this message.

"error": "You must provide a valid email address in the 'From' header to perform this action."

That’s not in the documentation.

https://developer.pagerduty.com/api-reference/reference/REST/openapiv3.json/paths/~1response_plays/get

https://developer.pagerduty.com/api-reference/reference/REST/openapiv3.json/paths/~1response_plays~1%7Bid%7D/get

I get the same error using curl too. The same API token works fine with a GET call to list users.

Is the API broken for listing and showing response plays? or am I doing something wrong here?

Any help much appreciated.

Thanks

Philip

Hey Philip,

Thanks for bringing this to our attention. I’ll check and make sure the documentation is up-to-date. In the mean time, can you try adding these undocumented fields and let me know if that works? Should just need to add the from email.

Best,

Ryan Viera
Technical Support Specialist
PagerDuty.com

Hi Ryan,

It works!

I added this header to the curl command.

--header 'from: user@domain'

The email address must be a valid user in the PagerDuty account.

Thanks

Philip

Hi Phillip,

Glad to hear it’s working now! I have reached out to our internal team to have the documentation updated!

Regards,

Sarah McFadyen
Technical Support Specialist
Pagerduty.com

I opened a case for this. If you are using a global API key, the FROM header is required. You can bypass this by using a personal API key for a user. Not sure why it is required for response play creation/updates. It should only be required for running a RP.